Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] account_financial_report: Migration to 18.0 #1253

Open
wants to merge 310 commits into
base: 18.0
Choose a base branch
from

Conversation

chaule97
Copy link

@chaule97 chaule97 commented Nov 22, 2024

<div class="row">
<div class="col-6 custom_footer">
<span
t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'default_payable_accounts_only':1,
}"
/>
<field name="groups_id" eval="[(4, ref('account.group_account_manager'))]" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

groups_id should be replaced with groups= in the element
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0

# Author: Julien Coux
# Copyright 2016 Camptocamp SA
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2021 Tecnativa - Jo??o Marques

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright 2021 Tecnativa - Jo??o Marques
# Copyright 2021 Tecnativa - João Marques

@@ -0,0 +1,13 @@
# ?? 2011 Guewen Baconnier (Camptocamp)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# ?? 2011 Guewen Baconnier (Camptocamp)
# © 2011 Guewen Baconnier (Camptocamp)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check other files as well for similar issues

else:
ag_pb_data[acc_id]["older"] += residual
ag_pb_data[acc_id][prt_id]["older"] += residual
if due_date:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to not have due_date? It is set on line 59 due_date = today

@chaule97 chaule97 force-pushed the 18.0-mig-account_financial_report branch from befa9ce to ff0b491 Compare November 25, 2024 04:38
@chaule97
Copy link
Author

Hi @henrybackman, I have optimized the query, can you check it again?

@chaule97 chaule97 force-pushed the 18.0-mig-account_financial_report branch from ff0b491 to 8f9d339 Compare November 25, 2024 07:38
@salvorapi
Copy link

LGTM

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@victoralmau
Copy link
Member

Please add #1257 to commit history

josepmy and others added 19 commits November 29, 2024 15:38
Currently translated at 100.0% (329 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/es/
Currently translated at 43.2% (142 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/pt_BR/
Currently translated at 100.0% (329 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/pt_BR/
Currently translated at 100.0% (329 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/pt_BR/
The number of computed account can be greater in certain databases with l10n modules.
Currently translated at 10.3% (34 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/fr/
Currently translated at 100.0% (329 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/pt_BR/
Currently translated at 23.1% (76 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/fr/
Currently translated at 23.1% (76 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/fr/
…cade

`report_journal_ledger` is auto-vacuumed as any transient model, but has some
ondelete="cascade" constraints that auto-remove subtables when a record is removed,
doing this operation very slow when selecting these sub-records.

Letting default ondelete="set null" would result in same performance bottleneck,
as the select on sub-table is performed the same for setting "null" value on them.

As a solution, and for avoiding a costly index operation, we delete by SQL sub-tables
rows in advance.

A bit of extra logic has been added for avoiding to remove that records if it's not
the turn of vacuum the parent table.
Currently translated at 84.5% (278 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/fr/
pedrocs-exo and others added 28 commits November 29, 2024 15:38
Currently translated at 100.0% (267 of 267 strings)

Translation: account-financial-reporting-17.0/account-financial-reporting-17.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report/pt/
Currently translated at 100.0% (267 of 267 strings)

Translation: account-financial-reporting-17.0/account-financial-reporting-17.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report/it/
Currently translated at 100.0% (267 of 267 strings)

Translation: account-financial-reporting-17.0/account-financial-reporting-17.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report/it/
Currently translated at 100.0% (267 of 267 strings)

Translation: account-financial-reporting-17.0/account-financial-reporting-17.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report/it/
Currently translated at 100.0% (267 of 267 strings)

Translation: account-financial-reporting-17.0/account-financial-reporting-17.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report/es/
Fix ReferenceError: _ is not defined when printing report to xlsx after preview
Currently translated at 100.0% (267 of 267 strings)

Translation: account-financial-reporting-17.0/account-financial-reporting-17.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report/it/
``analytic_distribution`` is a JSON field where keys are 'account.id' or 'account.id,account.id'
Eg: https://github.com/odoo/odoo/blob/8479b4e/addons/sale/models/account_move_line.py#L158
Previous implementation tried to convert to ``int`` the ``analytic_distribution`` dict keys, leading to a ``ValueError``.
This commit fixes this bug.
…umul cur. values in general ledger only if necessary

The currency_id field of the lines is always set, so follow the same logic as
in report/templates/general_ledger and show the data only if the currency is set
in the account.

TT51204
Currently translated at 100.0% (267 of 267 strings)

Translation: account-financial-reporting-17.0/account-financial-reporting-17.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report/it/
…alance (just like we display null initial balance)
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-reporting-17.0/account-financial-reporting-17.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report/
…als if the account has not set currency

Related to OCA#1235 (comment)

[FIX] account_financial_report: Avoid error in General ledger if the Show foreign currency checkbox is not checked.

Related to OCA#1236

TT51996
@chaule97 chaule97 force-pushed the 18.0-mig-account_financial_report branch from 8f9d339 to f403480 Compare November 29, 2024 09:22
@chaule97
Copy link
Author

Please add #1257 to commit history

thanks, I have added these commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.